<template>
  <view>
    <my-message-top :text="'喵之魔镜'"></my-message-top>
    
    <view class="cat-magic">
      <text class="cat-magic-t1">tips：上传一张猫咪照片即可召唤猫之本体，
一键获知猫咪的品种信息及性格特征哦！</text>
      <image src="../../static/cat-magic/group148.png" mode="" @click="getCatId()"></image>
      <text class="cat-magic-t2">快来上传一张照片试试吧！</text>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        pic: ''
      };
    },
    methods:{
      async getCatId(){
      const res = await uni.chooseImage({
      	count: 1, 
      	
      });  
      console.log(res[1].tempFilePaths[0]);
      uni.navigateTo({
        url: '/subpkg/cat-detail/cat-detail?file=' + res[1].tempFilePaths[0]
      })
      
      
      }
    }
  }
</script>

<style lang="scss">
.cat-magic{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  margin: 225rpx 50rpx;
  .cat-magic-t1{
    font-size: 13px;
    color: #868686;
    margin-bottom: 35rpx;
  }
  image{
    width: 442rpx;
    height: 442rpx;
    margin-bottom: 35rpx;
  }
  .cat-magic-t2{
    font-size: 20px;
    font-weight: bold;
    color: #868686
  }
}
</style>
